import request from "@/network/request";

let model = 'emp';
let empApi = {
    getAllEmpByPage: function (data) {
        return request({
            url: `${model}/getEmpByPage`,
            method: "post",
            data: data
        })
    },
    addEmp: function (data) {
        return request({
            url: `${model}/addEmp`,
            method: "post",
            data: data
        })
    },
    updateEmp: function (data) {
        return request({
            url: `${model}/updateEmp`,
            method: "post",
            data: data
        })
    },
    deleteEmp: function (id) {
        return request({
            url: `${model}/deleteEmpById`,
            method: "post",
            params: {empId: id}
        })
    }
}

export default empApi;